#include "mainwindow.h"
#include <QPushButton>
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //定义一个按钮
    QPushButton *button = new QPushButton("Quit");
    //信号与槽机制，当按钮点击时，触发信号，信号被触发之后执行槽slot中的相关函数
    QObject::connect(button,SIGNAL(cliced()),&a,SLOT(quit()));
    button->show();
    return a.exec();
}
